package breakcontinue;

public class Eggs {
	public static void main(String[] args) {
		// 有一个人打了一筐鸡蛋，计算这筐鸡蛋最少多少个， 
		// 2个2个拿还剩1个。3个3个拿剩2，4个4个拿还剩3个,5个5个拿剩4个
		int eggs = 1;
		
		while (true) {
			
			if (eggs % 2 == 1 && eggs % 3 == 2 && eggs % 4 == 3 && eggs % 5 == 4) {
				System.out.println(eggs);
				break;
			}
			eggs++;
		}
	}
}
